module.exports = app => {
    const mongoose = require("mongoose")
    mongoose.connect('mongodb://127.0.0.1:27017/moba-game', {
        useUnifiedTopology: true,
        useNewUrlParser: true
    })

    // 防止有模型在连接数据库时未被引用到
    require('require-all')(__dirname + '/../models')
}
